<? $page_title='领料需求' ?>

<?include "FASHION/page_header.phtml"?>

<script language="JavaScript">
$(function(){ajax_form({id:'form1', success:function(){location.reload();}, before:function(){ return check_amount() && confirm('确认提交<?$page_title?>吗？');} });});
</script>

<form method="post" id="form1">
<table border="0" width="100%"><tbody>
<tr><td>
	<table border=0 class="list" width="100%" id="stuff_list"><tbody>
		<tr class="nobg">
			<td colspan="10" class="left"><?=htmlutil::search_wares('demand')?></td>
		</tr>
		<tr class="nobg">
			<th>编号</th>
			<th>材料名称</th>
			<th>品牌</th>
			<th>规格</th>
			<th>单位</th>
			<th>数量</th>
			<th>工单号</th>
			<th>用途</th>
			<th width="40">&nbsp;</th>
		</tr>
<{if $stuffs}>
<{foreach item=ware from=$stuffs}>
	<tr id="selstf_<{$ware.ware_id}>">
		<td><{$ware.sno}>&nbsp;</td>
		<td><{$ware.name}>&nbsp;</td>
		<td><{$ware.brand}></td>
		<td><{$ware.specific}></td>
		<td><{$ware.unit}></td>
		<td style="padding:0;"><input type="text" name="amount[<{$ware.ware_id}>]" size="5" class="decimal" onfocus="chkdig_int(this)" value="<? $ware.amount ?>" /> / <{$ware.amount}></td>
		<td style="padding:0;" width="120"><input type="text" name="add_sno[<{$ware.ware_id}>]" value='<? $ware.add_sno ?>' size="8" style="width:98%;" /></td>
		<td style="padding:0;" width="120"><input type="text" name="remark[<{$ware.ware_id}>]" value='<? $ware.remark ?>' size="8" /></td>
		<td><a href="javascript:;" onclick="$('#selstf_<{$ware.ware_id}>').remove();do_stuff_total();">取消</a></td>
	</tr>
<{/foreach}>
<{/if}>
	</tbody></table>
</td></tr>
<tr>
	<td class="center">
		<br/> <input type="submit" value="提 交" class="submit" />
<{if $ismodify}>
		<input type="hidden" name="bound_id" value="<{$bound.id}>" />
		<input type="hidden" name="sno" value="<{$bound.sno}>" />
<{/if}>
	</td>
</tr>
</tbody></table>
</form>

<?include "FASHION/page_footer.phtml"?>